/*
** xfunc3.c for my_irc in /home/billey_b/projet/my_irc
** 
** Made by Bastien Billey
** Login   <billey_b@epitech.net>
** 
** Started on  Fri Apr 13 12:55:04 2012 Bastien Billey
** Last update Tue Apr 17 15:08:00 2012 anthony jean
*/

#include <unistd.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include	"server.h"

int	xclose(int fd)
{
  int	ret;

  ret = close(fd);
  if (ret == -1)
    {
      perror("close");
      exit(0);
    }
  return ret;
}

int	xselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
{
  int	ret;

  ret = select(nfds, readfds, writefds, exceptfds, timeout);
  if (ret == -1)
    {
      perror("select");
      exit(0);
    }
  return ret;
}
